package org.apache.ibatis.reflection.wrapper;

import org.apache.ibatis.reflection.MetaObject;

import java.util.Date;

public class CustomBeanWrapperFactory implements ObjectWrapperFactory{
  @Override
  public boolean hasWrapperFor(Object object) {
    if (object instanceof Date) {
      return true;
    } else {
      return false;
    }
  }

  @Override
  public ObjectWrapper getWrapperFor(MetaObject metaObject, Object object) {
    return new CustomBeanWrapper(metaObject, object);
  }
}
